


// 判断传入的值-是否为整数
function address(addressdata,arr) {

    let selectarr=arr
    let objaddress=[]
    let selectone={}
    let selecttwo={}
    let selectthree={}
    selectone={id:addressdata[selectarr[0]].id
      ,
      name:addressdata[selectarr[0]].name,
      code:addressdata[selectarr[0]].code
    }
    selecttwo={id:addressdata[selectarr[0]].sub[selectarr[1]].id
      ,
      name:addressdata[selectarr[0]].sub[selectarr[1]].name,
      code:addressdata[selectarr[0]].sub[selectarr[1]].code
    }
    selectthree={id:addressdata[selectarr[0]].sub[selectarr[1]].sub[selectarr[2]].id
      ,
      name:addressdata[selectarr[0]].sub[selectarr[1]].sub[selectarr[2]].name,
      code:addressdata[selectarr[0]].sub[selectarr[1]].sub[selectarr[2]].code
    }
    objaddress.push(selectone,selecttwo,selectthree)

    return objaddress
    
  }
  
 
  export { address };
  